package router

import (
	"ginweb/module/router/handler"

	"github.com/gin-gonic/gin"
)

// Load 路由模块
func Load(g *gin.Engine) {
	// dir, _ := os.Getwd()
	// g.StaticFS("/", http.Dir(strings.Replace(dir, "\\", "/", -1)+"/static"))

	g.POST("/qd/sys/login", handler.Login)

	//comm模块路由
	rUser := g.Group("/user")
	{
		// rUser.Use(middleware.MidURLAccess)
		rUser.GET("/list", handler.FindAllUsers)
		rUser.GET("/id/:id", handler.FindUserByID)
		rUser.POST("", handler.SaveUser)
		// rUser.DELETE("", handler.UserList)
	}
}
